package com.example.ai.repository;

import com.example.ai.model.Question;
import com.example.ai.model.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.LocalDateTime;

public interface QuestionRepository extends JpaRepository<Question, Long> {
    Page<Question> findByUser(User user, Pageable pageable);
    long countByUser(User user);
    long countByUserAndCreatedAtAfter(User user, LocalDateTime dateTime);
} 